<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <form class="form-horizontal m-t" id="signupForm">

                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                <label class="col-sm-3 control-label">&nbsp请输入权利人基本信息&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp</label>

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"></label>

                        </div>

                        <div class="form-group"  id="div-owner">
                            <label class="col-sm-2 control-label">公司名称：</label>
                            <div class="col-sm-2">
                                <input id="copyrightOwner" name="copyrightOwner" class="form-control" type="text"
                                       placeholder="如果是个人请输入姓名" onchange="getCertNo()">
                            </div>

                            <label class="col-sm-1 control-label">统一信用代码：</label>
                            <div class="col-sm-2">
                                <input id="certNo" name="certNo" class="form-control" type="text"
                                       placeholder="如果是个人请输入身份证号码">
                            </div>
                            <div class="col-sm-2 ">
                                <button type="button" id="moreOwner" onclick="addOwner()" class="btn btn-circle">十
                                </button>
                            </div>
                        </div>

                        <div class="form-group" id="div-companyOpdate">
                            <label class="col-sm-2 control-label">公司成立日期：</label>

                            <div class="col-sm-6">
                                <div class="input-group date" id='date0'>
                                    <input id="companyOpdate" name="companyOpdate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">权利人所在城市：</label>
                            <div class="col-sm-1">
                                <input id="ownerCity" name="ownerCity" class="form-control" type="text">
                            </div>
                            <div class="col-sm-6">
                                <label class="col-sm-1 control-label">省</label>
                                <div class="col-sm-2">
                                    <select id="province" name="province" class="selectpicker"
                                            style="width:100%;height:33px" onchange="">

                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">市</label>
                                <div class="col-sm-2">
                                    <select id="city" name="city" class="selectpicker"
                                            style="width:100%;height:33px" onchange="chOwnerCity()">

                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">联系人：</label>
                            <div class="col-sm-6">
                                <input id="contact" name="contact" class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">电话：</label>
                            <div class="col-sm-6">
                                <input id="phone" name="phone" class="form-control" type="text"
                                       placeholder="用于接收版权局验证码。">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">详细地址：</label>
                            <div class="col-sm-6">
									<textarea id="address" name="address" class="form-control" rows="5"
                                              placeholder="请填写营业执照注册地址，如果是个人请填写身份证地址"></textarea>
                            </div>
                        </div>


                    </div>
                    <div class="ibox-content">
                        <div class="form-group">

                            <label class="col-sm-3 control-label">软件清单：共计</label>
                            <div class="col-sm-1">
                                <input id="numb" name="numb" class="form-control" type="text">
                            </div>
                            <label class="col-sm-1 control-label" style="text-align:left">件，</label>
                            <div class="col-sm-1">
                                <select id="workDays" name="workDays" class="selectpicker" style="width:100%;height:34px">
                                    <option value="0">普件</option>
                                    <option value="31" selected>31-35工作日</option>
                                    <option value="26">26-30工作日</option>
                                    <option value="21">21-25工作日</option>
                                    <option value="16">16-20工作日</option>
                                    <option value="11">11-15工作日</option>
                                    <option value="6">6-10工作日</option>
                                    <option value="3">3-5工作日</option>

                                </select>
                            </div>
                            <label class="col-sm-1 control-label" style="text-align:left">个工作日</label>
                        </div>

                        <input id="businessMan" name="businessMan" th:value="${userId}" class="form-control"
                               type="hidden">
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">软件名称：</label>
                            <div class="col-sm-2">
                                <input name="softwareName" class="form-control" type="text">
                            </div>
                            <label class="col-sm-1 control-label">开发完成日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date" name='dateset' id='date11'>
                                    <input  name="softCompltdate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                            <label class="col-sm-1 control-label">发表日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date" name='dateset' id='date12'>
                                    <input  name="publishDate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">软件名称：</label>
                            <div class="col-sm-2">
                                <input name="softwareName" class="form-control" type="text">
                            </div>
                            <label class="col-sm-1 control-label">开发完成日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date"  name='dateset' id='date21'>
                                    <input name="softCompltdate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                            <label class="col-sm-1 control-label">发表日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date" name='dateset' id='date22'>
                                    <input  name="publishDate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">软件名称：</label>
                            <div class="col-sm-2">
                                <input  name="softwareName" class="form-control" type="text">
                            </div>
                            <label class="col-sm-1 control-label">开发完成日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date"  name='dateset' id='date31'>
                                    <input name="softCompltdate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                            <label class="col-sm-1 control-label">发表日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date" name='dateset' id='date32'>
                                    <input  name="publishDate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">软件名称：</label>
                            <div class="col-sm-2">
                                <input name="softwareName" class="form-control" type="text">
                            </div>
                            <label class="col-sm-1 control-label">开发完成日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date"  name='dateset' id='date41'>
                                    <input name="softCompltdate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                            <label class="col-sm-1 control-label">发表日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date" name='dateset' id='date42'>
                                    <input  name="publishDate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="ibox-content" id="div-soft">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">软件名称：</label>
                            <div class="col-sm-2">
                                <input name="softwareName" class="form-control" type="text">
                            </div>
                            <label class="col-sm-1 control-label">开发完成日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date"  name='dateset' id='date51'>
                                    <input  name="softCompltdate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                            <label class="col-sm-1 control-label">发表日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date" name='dateset' id='date52'>
                                    <input  name="publishDate" type="text" class="form-control">
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="ibox-content" id="div-soft6" style="display: none;">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">软件名称：</label>
                            <div class="col-sm-2">
                                <input name="softwareName" class="form-control" type="text">
                            </div>
                            <label class="col-sm-1 control-label">开发完成日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date"  name='dateset' id='date61'>
                                    <input  name="softCompltdate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                            <label class="col-sm-1 control-label">发表日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date" name='dateset' id='date62'>
                                    <input  name="publishDate" type="text" class="form-control">
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="ibox-content" id="div-soft7" style="display: none;">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">软件名称：</label>
                            <div class="col-sm-2">
                                <input name="softwareName" class="form-control" type="text">
                            </div>
                            <label class="col-sm-1 control-label">开发完成日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date"  name='dateset' id='date71'>
                                    <input  name="softCompltdate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                            <label class="col-sm-1 control-label">发表日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date" name='dateset' id='date72'>
                                    <input  name="publishDate" type="text" class="form-control">
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="ibox-content" id="div-soft8" style="display: none;">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">软件名称：</label>
                            <div class="col-sm-2">
                                <input name="softwareName" class="form-control" type="text">
                            </div>
                            <label class="col-sm-1 control-label">开发完成日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date"  name='dateset' id='date81'>
                                    <input  name="softCompltdate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                            <label class="col-sm-1 control-label">发表日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date" name='dateset' id='date82'>
                                    <input  name="publishDate" type="text" class="form-control">
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="ibox-content" id="div-soft9" style="display: none;">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">软件名称：</label>
                            <div class="col-sm-2">
                                <input name="softwareName" class="form-control" type="text">
                            </div>
                            <label class="col-sm-1 control-label">开发完成日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date"  name='dateset' id='date91'>
                                    <input  name="softCompltdate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                            <label class="col-sm-1 control-label">发表日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date" name='dateset' id='date92'>
                                    <input  name="publishDate" type="text" class="form-control">
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="ibox-content" id="div-soft10" style="display: none;">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">软件名称：</label>
                            <div class="col-sm-2">
                                <input name="softwareName" class="form-control" type="text">
                            </div>
                            <label class="col-sm-1 control-label">开发完成日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date"  name='dateset' id='date101'>
                                    <input  name="softCompltdate" type="text" class="form-control">
                                    <span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
                                </div>
                            </div>
                            <label class="col-sm-1 control-label">发表日期：</label>
                            <div class="col-sm-2">
                                <div class="input-group date" name='dateset' id='date102'>
                                    <input  name="publishDate" type="text" class="form-control">
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="ibox-content" id="div-submit">
                        <div class="form-group">
                            <div class="col-sm-2 col-sm-offset-3">
                                <button type="submit" id="save" class="btn btn-primary">&nbsp&nbsp&nbsp&nbsp完成提交&nbsp
                                    &nbsp&nbsp&nbsp</button>
                            </div>
                            <div class="col-sm-2 col-sm-offset-3">
                                <button type="button" id="onceMore" onclick="addSoftware()"
                                        class="btn btn-primary">添加软件
                                </button>
                            </div>
                        </div>
                    </div>
                    <input id="userId" name="userId" type="hidden" th:value="${userId}" class="form-control">
                    <input id="agentId" name="agentId" type="hidden" th:value="${agentId}" class="form-control">

                </div>
            </form>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" src="/js/appjs/biz/infocoll/simcoll.js">

</script>
<script type="text/javascript" src="/js/area1.js">

</script>

<script>
    $(function () {
        $('#date0').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date11').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date12').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date21').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date22').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date31').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date32').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date41').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date42').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date51').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date52').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date61').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date62').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date72').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date71').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date82').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date81').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date92').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date91').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date102').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script>
    $(function () {
        $('#date101').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
    });
</script>
<script type="text/javascript">

    var index=0;
    function addOwner(){
        var addstep = index+1;
        $("#div-companyOpdate").before('<div class="form-group" id="div-owner' + addstep + '" > '
            +'<label class="col-sm-2 control-label">公司名称：</label>'
            + ' <div class="col-sm-2"> ' +
            ' <input id="copyrightOwner"+addstep+" name="copyrightOwner" class="form-control" type="text"' +
            ' placeholder="如果是个人请输入姓名"  onchange="getCertNo1("+addstep+")">'
            + ' </div> '
            +'<label class="col-sm-1 control-label">统一信用代码：</label>'
            + ' <div class="col-sm-2"> ' +
            ' <input id="certNo"+addstep+" name="certNo" class="form-control" type="text"' +
            ' placeholder="如果是个人请输入身份证号">'
            + ' </div> '
            +' </div> '
        );
        index+=1;
    }

    var count = 5;
    function addSoftware(){
        $("#save").text("完成提交");
        $("#save").attr("disabled", "none");
        var addstep = count+1;
        $("#div-soft"+count).attr("style","display:block;");

        /*$("#div-submit").before('<div class="ibox-content">' +
            '<div class="form-group" id="div-soft' + addstep + '" > '
            +'<label class="col-sm-1 control-label">软件名称：</label>'
            + ' <div class="col-sm-2"> ' +
            ' <input id="softwareName'+addstep+'" name="softwareName" class="form-control" type="text" placeholder="">'
            + ' </div> '
            +'<label class="col-sm-1 control-label">开发完成日期：</label>'
            + ' <div class="col-sm-2"> ' +
            ' <div class="input-group date"  name="dateset" id="date'+addstep+'1">'+
            ' <input id="softCompltdate'+addstep+'" name="softCompltdate" class="form-control" type="text"' +
            ' >'
            +'<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>'
            + ' </div> '
            + ' </div> '
            +'<label class="col-sm-1 control-label">发表日期：</label>'
            + ' <div class="col-sm-2"> ' +
            ' <div class="input-group date"  name="dateset" id="date'+addstep+'2">'+
            ' <input id="publishDate'+addstep+'" name="publishDate" class="form-control" type="text"' +
            ' >'
            +'<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>'
            + ' </div> '
            + ' </div> '
            +' </div> '
            +' </div> '
        );*/
        count+=1;
    }
    function chOwnerCity() {

        ownerCity = $("#province").val().concat("/",$("#city").val());
        $("#ownerCity").val(ownerCity);

    }
    function getCertNo() {

        copyrightOwner = $("#copyrightOwner").val();
        $.ajax({
            url : "/biz/infocoll/getUnionCode",
            type : "post",
            data : {
                'copyrightOwner' : copyrightOwner
            },
            success : function(r) {
                if (r.code==0) {
                    $("#certNo").val(r.msg);
                }
            }
        });
    }

    function getCertNo1(number) {

        copyrightOwner = $("#copyrightOwner"+number).val();
        $.ajax({
            url : "/biz/infocoll/getUnionCode",
            type : "post",
            data : {
                'copyrightOwner' : copyrightOwner
            },
            success : function(r) {
                if (r.code==0) {
                    $("#certNo"+number).val(r.msg);

                }
            }
        });
    }
</script>

</body>
</html>
